<%--
  Created by IntelliJ IDEA.
  User: Chuch
  Date: 2017/5/8
  Time: 11:25
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="../common/taglibs.jsp" %>
<html>
<head>
    <title>支付失败情况分析报表</title>
    <script src="${ctx}/js/views/payCount/payTransCountFailReport.js"></script>
</head>
<body ng-app="myApp" style="overflow:scroll;overflow-x:hidden">
<core:import url="../common/pageHead.jsp">
    <core:param name="title" value="支付失败情况分析报表"/>
</core:import>
<div ng-controller="queryCtrl" class="container-fluid">
    <form id="queryForm" name="queryForm" action="${ctx}/count/payFail/search"
          role="form" autocomplete="off">
        <table class="table table-bordered table-condensed">
            <tr>
                <td class="text-right">交易日期</td>
                <td>
                    <input type="text" class="{{vm.constant.inputClass}}" uib-datepicker-popup
                           ng-blur="vm.checkStartDay(vm.queryBean.startTime,vm.queryBean.endTime)"
                           ng-model="vm.queryBean.startTime" required/>
                    -
                    <input type="text" class="{{vm.constant.inputClass}}" uib-datepicker-popup
                           ng-blur="vm.checkEndDay(vm.queryBean.startTime,vm.queryBean.endTime)"
                           ng-model="vm.queryBean.endTime" required/>
                </td>
            </tr>
            <tr align="center">
                <td colspan="6">
                    <button type="button" ng-click="vm.queryDetail()" class="btn btn-default">
                        查询
                    </button>
                    <button type="button" ng-click="vm.resetForm()" class="btn btn-default">重置</button>
                    <shiro:hasPermission name="refund-report_download">
                        <button down-file="${ctx}/count/payFail/download" params="vm.queryBean"
                                down-file-type="xls" class="btn btn-default" down-cfg="vm.downCfg">
                            下载
                        </button>
                    </shiro:hasPermission>
                </td>
            </tr>
        </table>
    </form>

    <div>
        <table table-detail>
            <thead>
            <tr>
                <th>序号</th>
                <th>交易开始时间</th>
                <th>交易结束时间</th>
                <th>类型</th>
                <th>失败原因</th>
                <th>数量</th>
                <th>占比</th>
                <th>失败明细</th>
            </tr>
            </thead>
            <tbody ng-repeat="bean in vm.list track by $index">
            <td>{{$index+1}}</td>
            <td>{{bean.startTime}}</td>
            <td>{{bean.endTime}}</td>
            <td>{{bean.failType}}</td>
            <td>
                <span ng-if="bean.failReason == null">null</span>
                    <span ng-if="bean.failReason != null">
                        {{bean.failReason}}
                    </span>
            </td>
            <td>{{bean.total}}</td>
            <td>{{bean.failReasonRate}}</td>
            <td>
                <button type="button"  ng-click= "vm.show(bean)" style="background:paleturquoise;">查看失败明细</button>
            </td>
            </tbody>
            <tr>
                <td></td><td></td><td></td><td></td>
                <td>总计</td>
                <td>{{vm.totalCount}}</td>
                <td></td><td></td>
            </tr>
        </table>
    </div>
    <core:import url="../common/pageFoot.jsp"/>
</div>
<core:import url="../common/nav.jsp"/>
</body>
</html>

